<style>
	#upTbody tr td input{
		text-align: center;
	}
	#upTbody tr{
		height: 42px;
	}
	
	.webuploader-container {
		position: relative;
	}
	.webuploader-element-invisible {
		position: absolute !important;
		clip: rect(1px 1px 1px 1px); /* IE6, IE7 */
	    clip: rect(1px,1px,1px,1px);
	}
	.webuploader-pick {
		position: relative;
		display: inline-block;
		cursor: pointer;
		color: #fff;
		text-align: center;
		border-radius: 3px;
		overflow: hidden;
		margin-top: 7px;
	}
	.webuploader-pick-hover {
		color: #00a2d4;
	}
	
	.webuploader-pick-disable {
		opacity: 0.6;
		pointer-events:none;
	}

</style>
<script type="text/javascript">
	//绑定Upload点击事件
	var pmuploader = WebUploader.create({
		swf:'/webuploader/Uploader.swf',
		server:upserver,
		pick:'#picker',
		resize:false,
		auto:true,
		fileNumLimit:1,
		accept:{
			title:'execl',
			extensions:'xlsx,xls',
			mimeTypes:'application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
		}
	});
	pmuploader.on( 'fileQueued', function(file) {
		if(file.ext != "xls" && file.ext != "xlsx"){
			layer.msg("Please select Execl File!");
			pmuploader.cancelFile(file);
			ui.shutProcess();
		}
	});
	pmuploader.on('uploadSuccess', function(file,data) {
		if(data.code != null && data.code == '-101'){
			layer.msg("Upload Error,Maximum upload size exceeded !");
			ui.shutProcess();
			return;
		}else{
			layer.msg("Upload Success!");
		}
		//upload.makeData(data);
		pmuploader.reset();
		ui.shutProcess();
	});
	pmuploader.on('uploadError', function(file) {
		ui.shutProcess();
		layer.msg("Upload Error!");
	});
	pmuploader.on('startUpload', function(file) {
		ui.popProcess();
	});
	pmuploader.on('stopUpload', function(file) {
		ui.shutProcess();
	});
</script>
<h3>
	<em>You can enter data directly into the Data List or Download Data Template and fill it out before uploading in bulk</em>
	<button id="down"><img src="/module/base/images/17.png" />Download Data Template</button>
	<img onclick="comback();" src="/module/base/images/18.png" style="z-index: 999;"/>
</h3>
<h4>Data List<img onclick="addRow()" src="/module/base/images/24.png" />
<button><div id="picker"><img style="margin-right:10px;" src="/module/base/images/26.png"/>Upload New Data</div></button>
</h4>
<article>
	<table style="width: 3300px;" class="n-tb">
		<colgroup>
			<col/>
			<col/>
			<col/>
			<col/>
			<col/>
			<col/>
			<col/>
			<col/>
			<col/>
			<col/>
			<col/>
			<col/>
			<col/>
			<col/>
			<col/>
			<col/>
		</colgroup>
		<thead>
			<tr>
				<th>NO.</th>
				<th>Isotope Type</th>
				<th id="tabType">PM Type</th>
				<th>Content</th>
				<th id="isotopic">Isotopic Composition</th>
				<th>SD</th>
				<th>n</th>
				<th id="ct">Concentration (μg/m<sup>3</sup>)</th>
				<th id="sd">SD (μg/m<sup>3</sup>)</th>
				<th>Sampling Date</th>
				<th>Year</th>
				<th>Season</th>
				<th>Sampling Site</th>
				<th>Nation</th>
				<th>Region</th>
				<th>Latitude(S-,N+)</th>
				<th>Longitude(W-,E+)</th>
				<!--<th>Analytical detials</th>-->
				<th>Laboratory</th>
				<th id="rf">Reference</th>
			</tr>
		</thead>
		<tbody id="upTbody">
			
		</tbody>
	</table>
</article>
<a href="#" class="pupload-sub"><img src="/module/base/images/20.png" />Submit</a>
<script>


//绑定Download template点击事件
$("#down").click(function(){
	upload.downloadTemplate();
})
//行增加
function addRow(){
	upload.addOneRow();
}
//提交数据
$(".pupload-sub").click(function(){
	upload.saveData();
})
function comback(){
	$(".n-nav-links a").eq(5).click();
}

</script>